package com.project.biz;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.project.entity.CmsSupplier;
import com.project.pojo.dto.SupplierDTO;
import com.project.pojo.model.AddSupplierModel;
import com.project.pojo.model.SelectSupplierModel;
import com.project.pojo.model.UpdateSupplierModel;

import java.util.List;

/**
 * @Description: 供应商业务层接口类
 * @Author: zhuchi
 * @CreateDate: 2020/12/15 11:07
 * @Version: 1.0
 */
public interface CmsSupplierBiz extends IService<CmsSupplier> {

    /**
     * 分页查询供应商
     * @param selectSupplierModel
     * @return
     */
    IPage<SupplierDTO> selectSupplier(SelectSupplierModel selectSupplierModel);

    /**
     * 查询供应商返回集合
     * @param selectSupplierModel
     * @return
     */
    List<SupplierDTO> selectSupplierList(SelectSupplierModel selectSupplierModel);

    /**
     * 添加供应商
     * @param addSupplierModel
     * @param userId
     * @return
     */
    int addSupplier(AddSupplierModel addSupplierModel, Long userId);

    /**
     * 修改供应商
     * @param updateSupplierModel
     * @param userId
     * @return
     */
    int updateSupplier(UpdateSupplierModel updateSupplierModel, Long userId);

    /**
     * 删除供应商
     * @param supplierId 供应商ID
     * @param userId
     * @return
     */
    int delSupplier(Long supplierId, Long userId);

}
